#include "matrixfunctions.h"
int average(int x[][100], int rows, int col)
{
	int sum=0;
	int i, j;
	for (i=0;i<rows;i++)
		for(j=0;j<col;j++)
			sum+= x[i][j];
return sum/(rows*col);
}

int main()
{
	int row, col, av;
	int mat[100][100];
	cout<<"Number of rows : " ;
	cin>>row;
	cout<<"Number of columns : " ;
	cin>>col;
	readmatrix(mat, row, col);
	av=average(mat, row, col);
	cout<<av<<"\n";


return 0;
}
